import { service, type ResultType } from '@/utils/requester'

export const loginApi = (data: { username: string, password: string }): Promise<ResultType> => {
    return service.post("/fc-user/login", data);
}


export const registerApi = (data: { username: string, password: string }): Promise<ResultType> => {
    return service.post("/fc-user/register", data);
}


export const searchApi = (userIdentify: string): Promise<ResultType> => {
    return service.get("/fc-user/search", { params: { userIdentify } });
}


export const getUserByIdApi = (userId: number): Promise<ResultType> => {
    return service.get("/fc-user/get_user/"+userId,);
}